from flask import Flask,jsonify
from flask_cors import CORS
from views.firstbp import firstbp

from config import Config
from db import db1

def create_app():
    app = Flask(__name__)
    with app.app_context():
        pass
    return app
app = create_app()

app.config.from_object(Config)

CORS(app)
app.register_blueprint(firstbp)


@app.route('/test')
async def hello_world():
    res = '牛逼'
    return jsonify({'code':200,'list':res})


if __name__ == '__main__':
    app.run()
